<?php
namespace app\common\system\model;

use think\Model;

class LoginRecord extends Model
{
    public static function write($userId, $ip)
    {
        $data['user_id'] = $userId;
        $data['ip'] = $ip;
        $data['create_time'] = time();
        self::insert($data);
    }
}